<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.fit.user.entity.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="com.fit.user.dao.*"  %>
<%
String contextPath = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+contextPath+"/";

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'select_case.jsp' starting page</title>
    

	
	  	<style type="text/css">

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}


</style>
<script type="text/javascript">
function gofun(_link) {
    window.top.frames('mainFrame').location.href=_link;

 }
 function gofun_check()
  {
  alert("对不起,您没有操作权限!");
  }
</script>
<link href="<%=contextPath%>/img/skin/skin.css" rel="stylesheet" type="text/css" />
		<link href="<%=contextPath%>/css/sic.css" rel="stylesheet" type="text/css" />
  <style type="text/css">
.warp_table {border-collapse:collapse; width:550px; border:1px solid #4d9ab0}
.warp_table td {border:1px solid #4d9ab0}
</style>
<script language="javascript"><!--
function senfe(o,a,b,c,d){
 var t=document.getElementById(o).getElementsByTagName("tr");
 for(var i=1;i<t.length;i++){
  t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
  t[i].onclick=function(){
   if(this.x!="1"){
    this.x="1";
    this.style.backgroundColor=d;
   }else{
    this.x="0";
    this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
   }
  }
  t[i].onmouseover=function(){
   if(this.x!="1")this.style.backgroundColor=c;
  }
  t[i].onmouseout=function(){
   if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
  }
 }
}
--></script>
  </head>

  <%
  String policeID = (String)session.getAttribute("policeID");
  PoliceMsgDAO policeMsgDAO = new PoliceMsgDAO();
  String purview = policeMsgDAO.getPoliceMsg(policeID).getPurview();
  String policeName = policeMsgDAO.getPoliceMsg(policeID).getPoliceName();
    String caseID = (String)session.getAttribute("caseID");
  String export = (String)request.getParameter("export");
  if(export!=null){
  %>

<script type="text/javascript">
				alert("导出成功!");
			</script>
<%
  }
   %>
  <body class="mybody">



  
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="table_boder" cellSpacing="0" cellPadding="0" width="100%" >
  <tr>
    <td width="17" valign="top" background="<%=contextPath%>/img/skin/mail_leftbg.gif"><img src="<%=contextPath%>/img/skin/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=contextPath%>/img/skin/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
      
        <td height="31" width="85">
          <a style="cursor:hand;" onclick="gofun('/police/police/bodyMsg.jsp')"> 
               <div class="mytitlebt">人身检查  
</div> </a>
        </td>
            <td height="31" width="85">
               <a style="cursor:hand;" onclick="gofun('/police/police/goods_and_material_evidencesmsg.jsp')"> 
       <div class="mytitlebt">物证保管</div>
       </a>
        </td>
            <td height="31" width="85">
              <a style="cursor:hand;" onclick="gofun('/police/msg_get.jsp')"> 
       <div class="mytitlebt">信息采集 </div>
       </a>
        </td>
            <td height="31" width="85">
         <a style="cursor:hand;" onclick="gofun('/police/police/inquiry_and_inquest.jsp')"> 
       <div class="mytitlebt">询问讯问</div>
       </a>
        </td>
            <td height="31" width="85">
         <a style="cursor:hand;" onclick="gofun('/police/police/manager_houwen.jsp')"> 
       <div class="mytitlebt">候问约束 </div>
        </td>
            <td height="31" width="85">
         <a style="cursor:hand;" onclick="gofun('/police/police/select_case.jsp')"> 
       <div class="titlebt">资料调阅</div>
       </a>
        </td>
        <%
				if(purview != null && purview.equals("0")){
				 %>
        <td height="31" width="85">
         <a style="cursor:hand;" onclick="gofun('/police/police/manager.jsp')"> 
       <div class="mytitlebt">县局管理</div>
       </a>
        </td>
 <%} else{%>
        
        <td height="31" width="85">
         <a style="cursor:hand;" onclick="gofun_check('')"> 
       <div class="mytitlebt">县局管理</div>
       </a>
        </td>
        <%} %>         <td height="20" align="right">&nbsp;</td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=contextPath%>/img/skin/mail_rightbg.gif"><img src="<%=contextPath%>/img/skin/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=contextPath%>/img/skin/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
		<table width="100%" height="450" border="0" cellpadding="0" cellspacing="0" id="mybgcolor">
		
		<tr><td height="10"><b style="font-size:20;">该备案编号为:<%=caseID%></b></td></tr>
		<tr><td valign="top" align="center">
     <form action="<%=basePath %>/selectCaseMsg.do?oper=getAllCaseMsg" method="post">
  <table border = "0">
  <tr>
  <%
  if(purview != null && purview.equals("3")){
   %>
    <td>民警警号：</td><td><input type="text" readonly="readonly" name="caseMsgEntity.policeID"  value=<%=policeID %>></td>
    <td>民警姓名：</td><td><input type="text" readonly="readonly" name="caseMsgEntity.policeName" value=<%=policeName %>></td>
   <%
     }else{
     %>
      <td>民警警号：</td><td><input type="text" name="caseMsgEntity.policeID" ></td> 
      <td>民警姓名：</td><td><input type="text" name="caseMsgEntity.policeName" ></td>
     <%
     }
    %>
 

  </tr>
  <tr>
  <td>备案编号：</td><td><input type="text" name="caseMsgEntity.caseID" ></td>
   <td>案件名称：</td><td><input type="text" name="caseMsgEntity.caseName" ></td>
  </tr>
   <tr>
      <td  align="center" colspan="2"><input type="submit" value="提交"> </td><td  align="center"><input type="reset" name="cancel" value="重置"></td>
      
      </tr>
        </table>
  </form>
      <%
      
      List<CaseMsgEntity> caseMsgEntitys = (List<CaseMsgEntity>)request.getAttribute("caseMsgEntitys");
      
      if(caseMsgEntitys != null){
      String[] table={"警号","姓名","案件编号","案件名称","操作"};
      %>
        <table class="table_boder" cellSpacing="0" cellPadding="0" width="100%" id="changecolor" >
        <tr align="center" class="myrow" bgcolor="#1D639F">
  <c:forEach var="name" items="<%=table %>">
			 <td class="td_boder"  style="color:#ffffff;">${name }</td> 
  </c:forEach>
  </tr>
   <c:forEach var="caseMsgEntity" items = "<%=caseMsgEntitys %>">
	<tr>
	<td>${caseMsgEntity.policeID }</td>
	<td>${caseMsgEntity.policeName }</td>
	<td>${caseMsgEntity.caseID }</td>
	<td>${caseMsgEntity.caseName }</td>
	<td>${caseMsgEntity.remark }</td>
	<td><a href ="<%=basePath %>police/select_all.jsp?caseID=${caseMsgEntity.caseID }">详细信息</a></td>
	<td><a href ="servlet/ExportMsg?caseID=${caseMsgEntity.caseID }">导出信息</a></td>
	      <%
				if(purview != null && purview.equals("0")){
				 %>
	<form action="servlet/AddRemark" method="post">
	<td>
	<textarea rows="3" cols="10" name="remark"></textarea>
	<input type="hidden" name="caseID" value="${caseMsgEntity.caseID }"/>
	</td>
	<td><input type="submit">
	</td>
	</form>
	<%
	}
	 %>
	
	</tr>
	</c:forEach>
	</table>
      <%
      }
       %>



		</td></tr></table>
	</td>
    <td background="<%=contextPath%>/img/skin/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="<%=contextPath%>/img/skin/mail_leftbg.gif"><img src="<%=contextPath%>/img/skin/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=contextPath%>/img/skin/buttom_bgs.gif"><img src="<%=contextPath%>/img/skin/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="<%=contextPath%>/img/skin/mail_rightbg.gif"><img src="<%=contextPath%>/img/skin/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
  </body>
  
  <script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
senfe("changecolor","#D2E2F9","#e5f1f4","#ecfbd4","#bce774");
--></script>
</html>
